package com.smooth.mall.model.dao;

import com.smooth.mall.model.pojo.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrderMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Order record);

    int insertSelective(Order record);

    Order selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);

    //更具订单号，查询订单
    Order selectByOrderNo(String orderNo);

    //根据userid查询订单详情
    List<Order> selectOrderForCustomer(@Param("userId") Integer userId);

    //后端订单列表
    List<Order> selectOrderForAdmin();
}